Skip to content

VAPI-2714 Update the python SDK to include BRTC endpoint APIs#280

Open
smoghe-bw wants to merge 37 commits intomainfrom
brtc-python-sdk
Open

VAPI-2714 Update the python SDK to include BRTC endpoint APIs#280
smoghe-bw wants to merge 37 commits intomainfrom
brtc-python-sdk

Conversation

@smoghe-bw
Copy link

No description provided.

- Introduced `SipCredentials` model for managing SIP connection credentials.
- Added documentation for `CreateEndpointRequestBase`, `CreateEndpointResponse`, `CreateEndpointResponseObject`, `CreateWebRtcConnectionRequest`, `Device`, `DeviceStatusEnum`, `Endpoint`, `EndpointDirectionEnum`, `EndpointEvent`, `EndpointEventTypeEnum`, `EndpointResponse`, `EndpointStatusEnum`, `EndpointTypeEnum`, `Endpoints`, `EndpointsApi`, `ErrorResponse`, `ListEndpointsResponse`, `Page`, `SipConnectionMetadata`, and `SipCredentials`.
- Implemented example usage in the documentation for each model.
- Implement integration tests for creating, retrieving, listing, and deleting WebRTC endpoints in `test/smoke/test_endpoints_api.py`.
- Add unit tests for models related to endpoint requests and responses, including `CreateEndpointRequestBase`, `CreateEndpointResponse`, `CreateEndpointResponseObject`, `Device`, and their respective enums in the `test/unit/models` directory.
- Ensure tests cover various scenarios including unauthorized and forbidden access attempts.
- Validate the functionality of endpoint events and status enums with dedicated unit tests.
@smoghe-bw smoghe-bw requested review from a team as code owners January 15, 2026 21:43
@bwappsec
Copy link

bwappsec commented Jan 15, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@smoghe-bw smoghe-bw marked this pull request as draft January 15, 2026 21:44
@smoghe-bw smoghe-bw marked this pull request as ready for review January 22, 2026 00:27
@smoghe-bw smoghe-bw changed the title VAPI-2694 Update the python SDK to include BRTC endpoint APIs VAPI-2714 Update the python SDK to include BRTC endpoint APIs Jan 22, 2026
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only some of the new models added by this PR are unit tested here, we need to have tests for all of the new models. If you remove test/* temporarily from the openpi-generator-ignore it'll generate test files for all of the models, and you can pick out the new ones as a base for the ones still missing here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are still unit tests missing here, I count 19 new models but only 15 new unit tests, we need to have unit tests for every new model.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are still unit tests missing here, I count 19 new models but only 15 new unit tests, we need to have unit tests for every new model.

assert_that(response.data.data, instance_of(list))
assert_that(len(response.data.data), greater_than(0))

listed_ids = [ep.endpoint_id for ep in response.data.data]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this assertion is unnecessary, can delete

assert_that(len(response.data.links), equal_to(0))
assert_that(response.data.errors, instance_of(list))
assert_that(response.data.data, instance_of(CreateEndpointResponseData))
assert_that(response.data.data, has_properties(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we've moved away from using has_properties in our tests, can we switch this and other assertions using it to do individual asserts on each proprty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants